home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6696 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: chronicle.mti.sgi.com!news
  2. From: austern@isolde.mti.sgi.com (Matt Austern)
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: Performance: C vs. C++
  5. Followup-To: comp.lang.c++,comp.lang.c
  6. Date: 09 Feb 1996 21:36:16 GMT
  7. Organization: SGI
  8. Message-ID: <AUSTERN.96Feb9133616@isolde.mti.sgi.com>
  9. References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net>
  10.     <4dnpl2$c8g@classic.iinet.com.au> <3105E9DC.1BE3@enermet.fi>
  11.     <DLr46y.7rH@txnews.amd.com> <4elk5l$3f2q@yuma.ACNS.ColoState.EDU>
  12.     <pronet01.31.003EB1E6@indirect.com> <3117F980.7890@hpato.aus.hp.com>
  13.     <4fgd62$asb@gaia.ns.utk.edu>
  14. Reply-To: austern@mti.sgi.com
  15. NNTP-Posting-Host: isolde.mti.sgi.com
  16. In-reply-to: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN's message of 9 Feb 1996 21:09:22 GMT
  17.  
  18. In article <4fgd62$asb@gaia.ns.utk.edu> mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel) writes:
  19.  
  20. >     This calling "member functions in for loops" business.
  21. >     The problem is that C++ offers neither
  22. >         1)  A linguistic mechanism to say "this is not a dispatched
  23. >             pointer".  I think it's a flaw to forcibly connect
  24. >             reference semantics with dispatchability. 
  25. >         2)  Closed compilation environments where the entire program
  26. >             is known to the compiler at once. 
  27.  
  28. Point 1 is indeed a language issue; it's debatable whether or not it's
  29. a genuine flaw.  C++ already has one mechanism for avoiding dispatch
  30. (declaring the method non-virtual), and I'm not sure that it would be
  31. justified to add a second mechanism to do the same thing.  There's a
  32. nonzero cost of adding features, even if each feature is individually
  33. a good idea.
  34.  
  35. Point 2 isn't a language issue, but an implementation issue: some C++
  36. implementations do in fact perform cross-module optimization.  The
  37. language itself permits separate compilation, but doesn't require it.
  38. -- 
  39. Matt Austern
  40. SGI: MTI Compilers Group
  41. austern@isolde.mti.sgi.com
  42.